import { DEBUG } from "cc/env";
import { ResLoader } from "./common/loader/ResLoader";
import { Logger } from "./common/log/Logger";
import { Config } from "../module/config/Config";
import { MessageManager } from "./common/event/MessageManager";
import { LayerManager } from "./gui/layer/LayerManager";

import { StorageManager } from "./common/storage/StorageManager";
import { AudioManager } from "./common/audio/AudioManager";
import { TimerManager } from "./common/timer/TimerManager";
import { GameManager } from "./game/GameManager";
import { HttpRequest } from "../libs/network/HttpRequest";
import { LanugageManager } from "../libs/gui/language/Language";
import { NetManager } from "../libs/network/NetManager";
import { ECSRootSystem } from "../libs/ecs/ECSSystem";
import {ecs} from '../libs/ecs/ECS'

export var version:string = "1.0.0";//框架版本号
//框架核心模块 
export class hiyooo{
    
    //日志模块
    static log = Logger;
    //配置模块
    static config = new Config();
    //存储模块
    static storage:StorageManager;
    //资源管理模块 
    static res : ResLoader;
    //全局消息模块 
    static message:MessageManager;
    //音频模块
    static audio:AudioManager;
    //倒计时模块
    static timer:TimerManager;
    //界面管理模块 
    static gui:LayerManager;
    //三维界面管理
    static game:GameManager;

    //多语言模块
    static language:LanugageManager = new LanugageManager();
    //http 请求
    static http:HttpRequest  = new HttpRequest();
    //websocket 
    static tcp:NetManager = new NetManager();

    // static ecs:ECSRootSystem = new ecs.
    static ecs:ECSRootSystem = new ecs.RootSystem();

    
}

if (DEBUG) {
        //@ts-ignore
    window.hiyooo = hiyooo;
}